home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 1998 November / IRIX 6.5.2 Base Documentation November 1998.img / usr / share / catman / g_man / cat3 / OpenGL / glmultmatrix.z / glmultmatrix
Encoding:
Text File  |  1998-10-20  |  6.8 KB  |  151 lines

  1.  
  2.  
  3.  
  4. ggggllllMMMMuuuullllttttMMMMaaaattttrrrriiiixxxx((((3333GGGG))))               OOOOppppeeeennnnGGGGLLLL RRRReeeeffffeeeerrrreeeennnncccceeee               ggggllllMMMMuuuullllttttMMMMaaaattttrrrriiiixxxx((((3333GGGG))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      ggggllllMMMMuuuullllttttMMMMaaaattttrrrriiiixxxxdddd,,,, ggggllllMMMMuuuullllttttMMMMaaaattttrrrriiiixxxxffff - multiply the current matrix with the
  10.      specified matrix
  11.  
  12.  
  13. CCCC SSSSPPPPEEEECCCCIIIIFFFFIIIICCCCAAAATTTTIIIIOOOONNNN
  14.      void ggggllllMMMMuuuullllttttMMMMaaaattttrrrriiiixxxxdddd( const GLdouble *_m )
  15.      void ggggllllMMMMuuuullllttttMMMMaaaattttrrrriiiixxxxffff( const GLfloat *_m )
  16.  
  17.  
  18. PPPPAAAARRRRAAAAMMMMEEEETTTTEEEERRRRSSSS
  19.      _m  Points to 16 consecutive values that are used as the elements of a 4x4
  20.         column-major matrix.
  21.  
  22. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  23.      ggggllllMMMMuuuullllttttMMMMaaaattttrrrriiiixxxx multiplies the current matrix with the one specified using
  24.      _m, and replaces the current matrix with the product.
  25.  
  26.      The current matrix is determined by the current matrix mode (see
  27.      ggggllllMMMMaaaattttrrrriiiixxxxMMMMooooddddeeee). It is either the projection matrix, modelview matrix, or
  28.      the texture matrix.
  29.  
  30. EEEEXXXXAAAAMMMMPPPPLLLLEEEESSSS
  31.      If the current matrix is C, and the coordinates to be transformed are,
  32.      v=(v[0],v[1],v[2],v[3]).  Then the current transformation is C x v, or
  33.  
  34.  
  35.  
  36.                       |     c[0]      c[4]      c[8]        c[12] |      |     v[0] |
  37.  
  38.                       |                          |      |      |
  39.                            c[1]      c[5]       c[9]        c[13]            v[1]
  40.                       |                          |      |      |
  41.                                                    x
  42.                       |     c[2]      c[6]       c[10]       c[14] |      |     v[2] |
  43.  
  44.                       |                          |      |      |
  45.                        c[3]  c[7]  c[11]   c[15]       v[3]
  46.                       |                         |     |     |
  47.  
  48.  
  49.  
  50.      Calling ggggllllMMMMuuuullllttttMMMMaaaattttrrrriiiixxxx with an argument of m=m[0],m[1],...,m[15] replaces
  51.      the current transformation with (C x M) x v, or
  52.  
  53.  
  54.  
  55.       |     c[0]      c[4]      c[8]        c[12] |      |     m[0]      m[4]      m[8]        m[12] |      |     v[0] |
  56.  
  57.       |                          |      |                          |      |      |
  58.            c[1]      c[5]       c[9]        c[13]            m[1]      m[5]       m[9]        m[13]            v[1]
  59.       |                          |      |                          |      |      |
  60.                                    x                               x
  61.       |     c[2]      c[6]       c[10]       c[14] |      |     m[2]      m[6]       m[10]       m[14] |      |     v[2] |
  62.  
  63.       |                          |      |                          |      |      |
  64.        c[3]  c[7]  c[11]   c[15]       m[3]  m[7]  m[11]   m[15]       v[3]
  65.       |                         |     |                         |     |     |
  66.  
  67.  
  68.  
  69.      Where 'x' denotes matrix multiplication, and v is represented as a 4 x 1
  70.      matrix.
  71.  
  72. NNNNOOOOTTTTEEEESSSS
  73.      While the elements of the matrix may be specified with single or double
  74.      precision, the GL may store or operate on these values in less than
  75.      single precision.
  76.  
  77.  
  78.  
  79.  
  80.  
  81.                                                                         PPPPaaaaggggeeee 1111
  82.  
  83.  
  84.  
  85.  
  86.  
  87.  
  88. ggggllllMMMMuuuullllttttMMMMaaaattttrrrriiiixxxx((((3333GGGG))))               OOOOppppeeeennnnGGGGLLLL RRRReeeeffffeeeerrrreeeennnncccceeee               ggggllllMMMMuuuullllttttMMMMaaaattttrrrriiiixxxx((((3333GGGG))))
  89.  
  90.  
  91.  
  92.      In many computer languages 4x4 arrays are represented in row-major order.
  93.      The transformations just described represent these matrices in column-
  94.      major order.  The order of the multiplication is important. For example,
  95.      if the current transformation is a rotation, and ggggllllMMMMuuuullllttttMMMMaaaattttrrrriiiixxxx is called
  96.      with a translation matrix, the translation is done directly on the
  97.      coordinates to be transformed, while the rotation is done on the results
  98.      of that translation.
  99.  
  100. EEEERRRRRRRROOOORRRRSSSS
  101.      GGGGLLLL____IIIINNNNVVVVAAAALLLLIIIIDDDD____OOOOPPPPEEEERRRRAAAATTTTIIIIOOOONNNN is generated if ggggllllMMMMuuuullllttttMMMMaaaattttrrrriiiixxxx is executed between the
  102.      execution of ggggllllBBBBeeeeggggiiiinnnn and the corresponding execution of ggggllllEEEEnnnndddd.
  103.  
  104. AAAASSSSSSSSOOOOCCCCIIIIAAAATTTTEEEEDDDD GGGGEEEETTTTSSSS
  105.      ggggllllGGGGeeeetttt with argument GGGGLLLL____MMMMAAAATTTTRRRRIIIIXXXX____MMMMOOOODDDDEEEE
  106.      ggggllllGGGGeeeetttt with argument GGGGLLLL____MMMMOOOODDDDEEEELLLLVVVVIIIIEEEEWWWW____MMMMAAAATTTTRRRRIIIIXXXX
  107.      ggggllllGGGGeeeetttt with argument GGGGLLLL____PPPPRRRROOOOJJJJEEEECCCCTTTTIIIIOOOONNNN____MMMMAAAATTTTRRRRIIIIXXXX
  108.      ggggllllGGGGeeeetttt with argument GGGGLLLL____TTTTEEEEXXXXTTTTUUUURRRREEEE____MMMMAAAATTTTRRRRIIIIXXXX
  109.  
  110.  
  111. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  112.      ggggllllLLLLooooaaaaddddIIIIddddeeeennnnttttiiiittttyyyy, ggggllllLLLLooooaaaaddddMMMMaaaattttrrrriiiixxxx, ggggllllMMMMaaaattttrrrriiiixxxxMMMMooooddddeeee, ggggllllPPPPuuuusssshhhhMMMMaaaattttrrrriiiixxxx
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.  
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.  
  137.  
  138.  
  139.  
  140.  
  141.  
  142.  
  143.  
  144.  
  145.  
  146.  
  147.                                                                         PPPPaaaaggggeeee 2222
  148.  
  149.  
  150.  
  151.